import request from '../req'
// 获取渠道账户列表
export const getChannelList = async (params: any) => {
    const res = await request.get('/crm/channel/list', {
        params: params,
        noCancel: true
    })
    return res
}
// 修改渠道名称
export const updateChannelName = async (data: any) => {
    const res = await request.put('/crm/channel', data)
    return res
}
// 新增渠道名称
export const addChannel = async (data: any) => {
    const res = await request.post('/crm/channel', data)
    return res
}
// 获取渠道号下的账户列表
export const getAccountList = async (params: any) => {
    const res = await request.get('/saas/note/receipt-info/list', {
        params: params
    })
    return res
}
// 新增收款账户
export const addAccount = async (data: any) => {
    const res = await request.post('/saas/note/receipt-info', data)
    return res
}
// 编辑收款账户
export const updateAccount = async (data: any) => {
    const res = await request.put('/saas/note/receipt-info', data)
    return res
}
// 删除收款账户
export const removeAccount = async (data: any) => {
    const res = await request.put(`/saas/note/receipt-info/delete?id=${data}`)
    return res
}

// 删除收款账户
export const editRechargeAccountInfoApi = async (data: {
    remark?: string
    receiptId?: string | number
    productType?: string | number
    payMode?: string | number
    id: string | number
}) => {
    const res = await request.post('/saas/note/saasCompany/edit-recharge-account-info', data)
    return res
}
